function [eccentricities, ...
          graphDiameter, ...
          graphRadius, ...
          graphCenters, ...
          graphExtremes] = GetEccentricities(distances, useAvgDistance)
if (nargin <2 || isempty(useAvgDistance))
    eccentricities = max(distances);
else
    eccentricities = mean(distances);
end

graphDiameter = max(eccentricities);
graphRadius = min(eccentricities);
graphCenters = (eccentricities == graphRadius);
graphExtremes = (eccentricities == graphDiameter);